From 1b2db61ce47f7c800c4a1ca49ca3d9b6113d1324 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Fri, 4 Apr 2025 11:07:28 +0200 Subject: [PATCH] do not change permissions of invalid items on discovery if we are going to delete those items, we will make them have the proper permissions when we need Signed-off-by: Matthieu Gallien --- src/libsync/discovery.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 9d7cede82..9939d4473 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -1871,7 +1871,6 @@ bool ProcessDirectoryJob::checkPermissions(const OCC::SyncFileItemPtr &item) item->_errorString = tr("Not allowed because you don't have permission to add subfolders to that folder"); const auto localPath = QString{_discoveryData->_localDir + item->_file}; qCWarning(lcDisco) << "unexpected new folder in a read-only folder will be made read-write" << localPath; - FileSystem::setFolderPermissions(localPath, FileSystem::FolderPermissions::ReadWrite); emit _discoveryData->remnantReadOnlyFolderDiscovered(item); return false; } else if (!item->isDirectory() && !perms.hasPermission(RemotePermissions::CanAddFile)) { @@ -2077,7 +2076,6 @@ int ProcessDirectoryJob::processSubJobs(int nbJobs) _dirItem->_errorString = tr("Not allowed because you don't have permission to add subfolders to that folder"); const auto localPath = QString{_discoveryData->_localDir + _dirItem->_file}; qCWarning(lcDisco) << "unexpected new folder in a read-only folder will be made read-write" << localPath; - FileSystem::setFolderPermissions(localPath, FileSystem::FolderPermissions::ReadWrite); emit _discoveryData->remnantReadOnlyFolderDiscovered(_dirItem); } -- 2.30.2